const { DataTypes } = require('sequelize');
const sequelize = require('../config/database')

const RestaurantReservationModel = sequelize.define('RestaurantReservation', {
  r_reservation_id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
    allowNull: false
  },
  restaurant_id: {
    type: DataTypes.INTEGER,
    allowNull: false
  },
  package_type: {
    type: DataTypes.ENUM('单人套餐', '2-3人套餐', '4-5人套餐'),
    allowNull: false
  },
  package_price: {
    type: DataTypes.DECIMAL(10, 2),
    allowNull: false
  },
  description: {
    type: DataTypes.TEXT,
    allowNull: false
  }
}, {
  freezeTableName: true,
  tableName: 'restaurant_reservation',
  timestamps: false
})

module.exports = RestaurantReservationModel